import "reflect-metadata"
// class Animal {
//   static type = "动物"
//   eat(){}
// }
//                      key      value
// Reflect.defineMetadata('Class', 'Animal medata',Animal);
// Reflect.defineMetadata('Class Property', 'type metadata',Animal, 'type');
// Reflect.defineMetadata('Proto method','eat metadata', Animal.prototype, 'eat');
/**
 weakMap = {
   Animal: {
     undefined: {"Class": "Animal metadata"},
     "type": {"Class Property": "type metadata"}
   },
   Animal.prototype: {
     "eat": {
       "Proto method": "eat metadata"
     }
   }
 }
 */

@Reflect.metadata("Class", "Animal metadata1")
class Animal {
  @Reflect.metadata("Class Property","type metadata")
  static type = "动物"
  @Reflect.metadata('Proto method','eat metadata')
  eat(a:string){
    return 123;
  }
}

 console.log(Reflect.getMetadata("Class", Animal));
 console.log(Reflect.getMetadata("Class Property", Animal));
 console.log(Reflect.getMetadata("Proto method", Animal.prototype, "eat"));


export {}